package com.gzl.test.struts.action;

import com.gzl.test.struts.bean.User;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class User2Action extends ActionSupport implements ModelDriven<User>{
	private User user = new User();
	
	public String login() throws Exception{
		System.out.println("用户姓名"+user.getUname());
		System.out.println("用户密码"+user.getPwd());
		System.out.println("用户年龄123"+user.getAge());
		return "login_ok";
	}



	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public User getModel() {
		// TODO Auto-generated method stub
		return user;
	}
	
	
}
